package com.icss.vo;

import java.util.Date;
import java.util.Map;
import java.util.TreeMap;

import com.icss.common.vo.BasePojo;

/**
 * 购物车pojo
 * 
 * @author 郝厅
 */
public class GymCart extends BasePojo<GymCart>
{
	private int id;
	private int usersId;
	private int prodId;
	private int num;
	private Date createTime;

	/*--字符串表示--*/
	/*--对象表示--*/
	private GymUsers users;
	private GymGoods product;
	/* 存储所有状态的容器 */
	private Map<String, String> enumsMap = new TreeMap<String, String>();

	/**
	 * 获取此表相关的所有枚举值
	 * 
	 * @return 键为枚举的变量名+枚举的值; 值为枚举的名字 如:key:STATUS_ENABLE-1,值:启用
	 */
	public Map<String, String> getEnumsMap()
	{
		// 根据状态值获取字符串描述
		GymCartEnum[] enums = GymCartEnum.values();
		for (int i = 0; i < enums.length; i++)
		{
			GymCartEnum enumTemp = enums[i];
			String key = enumTemp.toString();
			enumsMap.put(key + "-" + enumTemp.getStatus() + "", enumTemp.getName());
		}
		return enumsMap;
	}

	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public int getUsersId()
	{
		return usersId;
	}

	public void setUsersId(int usersId)
	{
		this.usersId = usersId;
	}

	public int getProdId()
	{
		return prodId;
	}

	public void setProdId(int prodId)
	{
		this.prodId = prodId;
	}

	public int getNum()
	{
		return num;
	}

	public void setNum(int num)
	{
		this.num = num;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public GymUsers getUsers()
	{
		return users;
	}

	public void setUsers(GymUsers users)
	{
		this.users = users;
	}

	public GymGoods getProduct()
	{
		return product;
	}

	public void setProduct(GymGoods product)
	{
		this.product = product;
	}
}
